package com.aloda.controller.user;

import com.aloda.result.Result;
import com.aloda.service.TagService;
import com.aloda.vo.TagListVO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@Tag(name = "客户端标签相关接口")
@RequestMapping("/user/tag")
public class TagController {

    @Resource
    private TagService tagService;

    /**
     * 获取简单的标签列表
     * @return List<TagListVO>
     */
    @Operation(summary = "获取所有标签")
    @GetMapping("/list")
    public Result<List<TagListVO>> getTagList() throws InterruptedException {
        List<TagListVO> list = tagService.getTagList();
        return Result.success(list);
    }
}
